﻿namespace Services.Interface;

/// <summary>
/// 功能菜单服务层接口
/// </summary>
public partial interface IFeatureBLL : IBaseBLL<Feature>
{
    /// <summary>
    /// 获取所有功能菜单
    /// </summary>
    /// <returns></returns>
    Task<List<Feature>> GetAllAsync(Expression<Func<Feature, bool>>? whereExpression = null);
    /// <summary>
    /// 获取功能树形结构
    /// </summary>
    /// <param name="features"></param>
    /// <param name="selectedIds"></param>
    /// <returns></returns>
    List<FeatureTree> GetFeatureTree(List<Feature> features, List<int>? selectedIds = null);
    /// <summary>
    /// 获取功能树形结构
    /// </summary>
    /// <param name="features"></param>
    /// <param name="selectedIds"></param>
    /// <returns></returns>
    List<FeatureTree> GetFeatureTreeMenu(List<Feature> features, List<int>? selectedIds = null);
    /// <summary>
    /// 获取子菜单元素
    /// </summary>
    /// <param name="id"></param>
    /// <param name="features"></param>
    /// <param name="featureIds"></param>
    /// <returns></returns>
    List<int> GetChildIds(int id, List<Feature> features, List<int>? featureIds = null);
}
